<%@ taglib prefix="t" tagdir="/WEB-INF/tags"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<t:wrapper title="${title} ${query}">
	<jsp:body>
		<c:choose>
		<c:when test="${ courses.size() > 0 }">
			<spring:message code="search.title.results" /> ${query}
			<c:forEach items="${courses}" var="course">
		 	
			 	<div onclick="location.href='<c:url value="/course/${course.id}" />'" class="search-course-bar">
			 		<div class="course-id">
			 			${course.id}
		 			</div>
		 			<div class="course-name">
		 				${course.name}
		 			</div>
		 			<div class="course-description">
		 				${course.description}
		 			</div>
		 			<div class="course-price">
		 				<spring:message code="content.general.currency" />${course.price}
		 			</div>
		 		</div>
		 	
			</c:forEach>
		</c:when>
		<c:otherwise>
			<spring:message code="search.no_results" />
		</c:otherwise>
		</c:choose>
	</jsp:body>
</t:wrapper>